package com.uzai.console.mapper;

import com.uzai.console.entity.MdGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MdGoodsMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int deleteByActivityId(@Param("activityId") Long activityId, @Param("merId") Long merId);

    int insert(MdGoods record);

    int insertSelective(MdGoods record);

    int batchAdd(List<MdGoods> list);

    MdGoods selectById(@Param("id") Long id, @Param("merId") Long merId);

    int updateByIdSelective(MdGoods record);

    int updateById(MdGoods record);

    /**
     * 根据免单活动id查询免单商品列表
     * @param activityId
     * @return
     */
    List<MdGoods> findListByActivityId(@Param("activityId") Long activityId, @Param("merId") Long merId);

}